package com.ruoyi.psi.inventory.record.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

/**
 * 入库记录实体类
 * 对应数据库字段 stock_in_record
 * @author lsy 2021.11.4
 * 修改：
 */
@Data
@NoArgsConstructor
public class StockInRecord {
    /**
     * 入库记录编号
     */
    @NotNull(message = "入库记录编号不能为空")
    @ApiModelProperty(value = "入库记录编号", required = true)
    private String stockInId;

    /**
     * 来源类型
     * 加工单1、委外生产计划2
     * 采购3
     */
    @ApiModelProperty(value = "来源类型 加工单1、委外生产计划2、采购3")
    private String sourceType;

    /**
     * 关联编号
     */
    @NotNull(message = "关联编号不能为空")
    @ApiModelProperty(value = "关联编号", required = true)
    private String associationId;

    /**
     * 员工编号
     */
    @NotNull(message = "员工编号不能为空")
    @ApiModelProperty(value = "员工编号", required = true)
    private String staffId;

    /**
     * 操作人
     */
    @ApiModelProperty(value = "操作人")
    private String staffName;

    /**
     * 产品编号
     */
    @NotNull(message = "产品编号不能为空")
    @ApiModelProperty(value = "产品编号", required = true)
    @Excel(name = "产品编号")
    private String produceId;

    /**
     * 产品名称
     */
    @Excel(name = "产品名称")
    private String produceName;

    /**
     * 产品规格
     */
    @Excel(name = "产品规格")
    private String produceSpecs;

    /**
     * 仓库编号
     */
    @NotNull(message = "仓库编号不能为空")
    @ApiModelProperty(value = "仓库编号", required = true)
    private String warehouseId;

    /**
     * 仓库名称
     */
    @ApiModelProperty(value = "仓库名称")
    private String warehouseName;

    /**
     * 入库数量
     */
    @ApiModelProperty(value = "入库数量")
    private double warehousingNumber;

    /**
     * 入库时间
     */
    @ApiModelProperty(value = "入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private java.sql.Timestamp createTime;

    public StockInRecord(String associationId, String sourceType, String staffId, String produceId, String warehouseId, double warehousingNumber) {
        this.associationId = associationId;
        this.sourceType = sourceType;
        this.staffId = staffId;
        this.produceId = produceId;
        this.warehouseId = warehouseId;
        this.warehousingNumber = warehousingNumber;
    }
}
